Skip to content

AutofIll Zoom Link#4287

Open
nigelpurvis wants to merge 2 commits into
developfrom
#4252-auto-zoom-link
Open

AutofIll Zoom Link#4287
nigelpurvis wants to merge 2 commits into
developfrom
#4252-auto-zoom-link

Conversation

@nigelpurvis

Copy link
Copy Markdown
Contributor

Changes

All of the changes went in EventModal.tsx, where I added the 'useUserScheduleSettings' import, called the hook to get the user's schedule settings, and then added a useEffect that autofills the Zoom link with the user's link from settings. Autofills when creating a new event in the calendar section.

Notes

Made it so the autofill only works when you are creating an event and not editing one.

Test Cases

Screenshots

Screenshot 2026-06-18 at 10 43 48 PM Screenshot 2026-06-18 at 10 43 33 PM

Checklist

  • All commits are tagged with the ticket number
  • No linting errors / newline at end of file warnings
  • All code follows repository-configured prettier formatting
  • No merge conflicts
  • All checks passing
  • Screenshots of UI changes (see Screenshots section)
  • Remove any non-applicable sections of this template
  • Assign the PR to yourself
  • No yarn.lock changes (unless dependencies have changed)
  • Request reviewers & ping on Slack
  • PR is linked to the ticket (fill in the closes line below)

Closes #4252

@staysgt staysgt left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job!

@staysgt staysgt requested a review from wavehassman June 19, 2026 15:26

@wavehassman wavehassman left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job!

const theme = useTheme();
const toast = useToast();
const user = useCurrentUser();
const { data: scheduleSettings } = useUserScheduleSettings(user.userId);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need isError, isLoading and error

if (personalZoomLink && !watch('zoomLink')) {
setValue('zoomLink', personalZoomLink);
}
}, [open, isEditMode, scheduleSettings, setValue, watch]);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

drop setValue and watch from the dependency array
replace watch('zoomLink') with getValues('zoomLink')

useEffect(() => {
  if (!open || isEditMode) return;
  if (scheduleSettings?.personalZoomLink && !getValues('zoomLink')) {
    setValue('zoomLink', scheduleSettings.personalZoomLink);
  }
}, [open, isEditMode, scheduleSettings]);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Maintenance] - Auto Set Zoom Link on Event

3 participants